<template>
  <div id="app">

    <el-button type="primary" @click="my_click">{{ num }}</el-button>

    <hr/>
    <p v-for="msg of list">{{ msg }}</p>

    <hr/>

    <el-button v-show="show">按钮</el-button>

    <router-link to="/home">Go to home</router-link> |
    <router-link to="/test">Go to test</router-link> |
    <router-link to="/demo">Go to Demo</router-link>

    <hr/>
    <router-view></router-view>

    <hr/>
  </div>
</template>

<script>

  import aaa from './model/load';

  const data = {
      num : 1,
      show : true,
      list : [
          'aaaa',
          'bbbb',
          'cccc'
      ]
  };

  export default {
      name: 'app',
      data () {
          data.user = aaa.loadUserData();
          //
          return data;
      },
      methods : {
          my_click : function () {
              if(data.num < 10) {
                  data.num++;
                  data.list.push('hello '+data.num);
              }

              data.show = !data.show;
          }
      }
  }
</script>

<style>

</style>
